When a hard disk drive (HDD) has more than one command to execute, the commands are placed in a queue from which the next command is chosen. A Rotational Position Optimization (RPO) algorithm is used to reorder the commands for execution. Presently, hard disk drives use a Shortest Access Time First (SATF) RPO algorithm to determine which command to select. This algorithm works as follows: given a set of commands in a queue, choose the command that can be started (accessed) first. This calculation has two parts, namely, the time to perform the seek and settle operation from the current cylinder to the target cylinder, and the latency (also referred to as “extra time” herein) between this point and the starting sector for the command. Together these parts make up the estimated access time (EAT) for each queued command. The SATF algorithm depends on accurate estimates of the access time. If the estimate is too low, the actuator may settle on track after the desired sector has passed rotationally resulting in a ‘miss’ which adds one full revolution to the access time and, thus, degrading performance. On the other hand, if the estimate is too high, the optimal command candidate is not chosen for execution.
In any case, a SATF RPO algorithm simply selects the command which can be started first. As critically recognized herein, the SATF algorithm does not account for the length (in blocks) of queue candidates or the fact that certain queue candidates may be linked sequentially to other commands that can be executed in one disk operation. Instead, the SATF algorithm simply compares the estimated access times of each command in the queue and selects the command with the lowest EAT for execution. As recognized by the present invention, this can result in non-optimal data throughput and the failure to execute an optimal number of commands per second.
More specifically, the present invention understands that in workloads that contain a mixture of random and semi-sequential accesses, the SATF algorithm may not select commands that result in the highest rate of operations per second, because the SATF algorithm will attempt to minimize access times only. Consequently, it will not lend weight to a command that has a pipe of sequential commands, such as LBA-sequential commands that might be received sequentially by the drive and which consequently lend themselves to the execution of multiple commands in one operation. As recognized above, however, a SATF algorithm does not exploit this feature, instead attempting only to minimize the next access time. That is, a SATF algorithm will select a long sequential pipe of commands only if it has the shortest access time of all random accesses currently in the queue.
The present invention still further recognizes that for a random or semi-sequential workload that contains a mixture of transfer lengths, a SATF algorithm does not lend weight to commands that have longer transfer lengths, which could otherwise optimize throughput. Accordingly, a SATF algorithm cannot directly optimize either metric, i.e., it cannot optimize throughput or operations per second.